# The Politicisation of EU Trade Agreement Negotiations - Replication Package for Chapters 1 and 2

This repository contains the replication materials for the analysis of the level and trajectories of politicization patterns across EU trade agreements and member states. Chapter 1 specifies the variation in the dependent variable, and Chapter 2 tests existing hypotheses from the field, first in a series of linear and logistic regressions, and then in a multiple linear and multiple logistic regression with all variables included, as well as interaction effects. The full reporting and commentary is available in the thesis document, which is available via the University of Antwerp's repository: https://repository.uantwerpen.be/docstore/d:irua:26387
DOI: 10.63028/10067/2099620151162165141


## Author
Scott Hamilton  
University of Antwerp  
October 2025

## Overview

This replication package generates all essential figures and tables from the trade agreement politicization analysis. The script produces:

- **Chapter 1 Figures (1.1-1.9)**: Descriptive analysis of politicization patterns and trajectory classifications
- **Chapter 2 Figures (2.1-2.10)**: Hypothesis testing through bivariate relationships and ANOVA analyses  
- **Table 2.1**: Multiple regression results with three model specifications
- **Table 2.4**: Confusion matrix from ridge regression multinomial classification

## Main Script

**`ch1_and_2_oct_clean.R`** - Complete replication script that generates all figures and statistical outputs

## Required Data Files

The script requires the following CSV files to be present in the same directory:

### Core Data Files
- `search_interest_wide.csv` - Google search interest data by member state and agreement
- `parliamentary_scrutiny_wide.csv` - Parliamentary scrutiny indicators by member state and agreement  
- `media_salience_wide.csv` - Media attention data by member state and agreement

### Explanatory Variable Files
- `depth_details.csv` - Regulatory depth measures for each trade agreement
- `date_data.csv` - Negotiation start dates for institutional change hypothesis
- `imports_relative.csv` - Trade import data for globalization backlash hypothesis
- `values_index.csv` - Inglehart-Welzel cultural values data for existential threat hypothesis
- `comm_power.csv` - Bilaterals.org search results for communicative power hypothesis

### Font Files (Optional)
- `fonts/Cormorant-Regular.ttf` - Custom font for publication-quality figures (optional)

## Required R Packages

The script automatically loads the following packages (install if needed):

```r
install.packages(c("dplyr", "tidyverse", "ggplot2", "patchwork", "ggcorrplot", 
                   "broom", "olsrr", "extrafont", "showtext", "car", "stargazer", 
                   "nnet", "kableExtra", "glmnet"))
```

## Key Methodological Features

### Composite Measures
- **Salience**: `((search interest * 2) + media salience) / 3`
- **Contestation**: `((parliamentary scrutiny * 2) + media salience) / 3`  
- **Politicization**: `min(salience, contestation)`

### Trajectory Classification
The script classifies each country-agreement dyad into one of five patterns:
1. **Societal Demand**: Search Interest ≥ Media Salience ≥ Parliamentary Scrutiny
2. **Elite Supply**: Search Interest ≤ Media Salience ≤ Parliamentary Scrutiny
3. **Partisan Representation**: Search Interest ≥ Media Salience & Media Salience ≤ Parliamentary Scrutiny
4. **Mediatization**: Search Interest ≤ Media Salience & Media Salience ≥ Parliamentary Scrutiny
5. **Unclassified**: All indicators equal

### Statistical Outputs

For each hypothesis test, the script provides:

**Linear Regression Results:**
- Coefficient estimate
- Statistical significance (p-value)
- R-squared value
- 95% confidence interval

**ANOVA Results:**
- F-statistic
- P-value
- Tukey's HSD test for multiple comparisons (when F-test is significant)

### Advanced Modeling
- **Multiple Regression**: Three model specifications with mean-centered predictors. Includes theoretically relevant interaction effects between framing and depth, framing and imports, and framing and post material values.
- **VIF Analysis**: Variance inflation factors for multicollinearity assessment
- **Ridge Regression**: Multinomial classification with cross-validation and class weights

## Output

Running the script will generate:

1. **Publication-ready figures** in grayscale with consistent styling
2. **Statistical test results** printed to console for each hypothesis
3. **Regression tables** in publication format via stargazer
4. **Confusion matrix** showing multinomial classification performance

## Usage

1. Ensure all required data files are in the working directory
2. Install required R packages
3. Run the complete script: `source("ch1_and_2_oct_clean.R")`

## Notes

- The script uses custom fonts for publication quality but will fall back to default fonts if unavailable
- All figures use consistent grayscale styling suitable for academic publication
- Statistical outputs are formatted for direct inclusion in academic writing
- The ridge regression approach addresses multicollinearity issues in the multinomial classification

## File Structure
```
├── ch1_and_2_oct_clean.R          # Main replication script
├── README.md                       # This file
├── data/
│   ├── search_interest_wide.csv        # Google search data
│   ├── parliamentary_scrutiny_wide.csv # Parliamentary data  
│   ├── media_salience_wide.csv         # Media attention data
│   ├── depth_details.csv               # Trade depth measures
│   ├── date_data.csv                   # Negotiation dates
│   ├── imports_relative.csv            # Trade import data
│   ├── values_index.csv                # Cultural values data
│   └── comm_power.csv                  # Communication power data
└── fonts/
    └── Cormorant-Regular.ttf           # Optional custom font
```
```

For questions about the replication package, please contact Scott Hamilton: scott.hamilton@uantwerpen.be 